﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Itfort.Web;

namespace Users.WebSite
{
	public partial class LoginPage : System.Web.UI.Page
	{
		protected void Page_Load(object sender, EventArgs e)
		{

		}

		protected void BtnOK_Click(object sender, EventArgs e)
		{
			string email = tbEmail.Text.Trim();
			string password = tbPassword.Text.Trim();

			User user = UserWeb.LoginByEmail(email, password);
			if (user != null)
			{
				UserWeb.RedirectFromLoginPage();
			}
			else
			{
				Response.Write("登录失败");
			}
		}
	}
}